<%--
  Created by IntelliJ IDEA.
  User: t430
  Date: 2018/7/27
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>list</title>
</head>
<body>



<form method="get" action="${pageContext.request.contextPath}/newstype/list">
<table>
    <tr>
        <td>类别名称</td>
        <td><input type="text" value="${newsType.typeName}" name="typeName" /> </td>
        <td>父级类别</td>
        <td><select name="parentId">
            <option value="0">==所有类别==</option>
            <c:forEach var="item" items="${plist}">
                <option ${newsType.parentId==item.id?"selected":""} value="${item.id}">${item.typeName}</option>


            </c:forEach>
        </select></td>
        <td><input type="submit" value="搜索"/> </td>
    </tr>

</table>
</form>

<table>
    <tr>
        <td>ID</td>
        <td>类别名称</td>
        <td>父类别</td>
    </tr>

    <c:forEach var="item" items="${list}">

        <tr>
            <td>${item.id}</td>
            <td>${item.typeName}</td>
            <td>${item.parentName}</td>
        </tr>
    </c:forEach>



</table>

<p>共${pageTool.totalRecordCount}条数据,每页${pageTool.pageSize},当前第${pageTool.currPageNo}/${pageTool.pageCount}
<a href="${pageContext.request.contextPath}/newstype/list?currPageNo=1&parentId=${newsType.parentId}&typeName
=${newsType.typeName}">首页</a>
<a href="${pageContext.request.contextPath}/newstype/list?currPageNo=${pageTool.currPageNo-1}&parentId
=${newsType.parentId}&typeName
=${newsType.typeName}">上一页</a>
    <a href="${pageContext.request.contextPath}/newstype/list?currPageNo=${pageTool.currPageNo+1}&parentId
=${newsType.parentId}&typeName
=${newsType.typeName}">下一页</a>
    <a href="${pageContext.request.contextPath}/newstype/list?currPageNo=${pageTool.pageCount}&parentId
=${newsType.parentId}&typeName
=${newsType.typeName}">尾页</a>




</p>

</body>
</html>
